<?php
ini_set('user_agent', 'Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 4 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19');

function getuuid($player)
	{
		ini_set('user_agent', 'Mozilla/5.0 (Linux; Android 4.2.1; en-us; Nexus 4 Build/JOP40D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19');
		$opts = [
			'http' => [
					'method' => 'GET',
					'header' => [
							'User-Agent: PHP'
					]
			]
		];
		$context = stream_context_create($opts);
		$apiurl = 'https://api.mojang.com/users/profiles/minecraft/'.$player;
		$json = file_get_contents($apiurl,true, $context);
        $decode = json_decode($json);
		return $decode->id;
	}

$str = '{"name":"ImJingLan","id":"ae4554143852485282f119e39e180921"}';
//$str = file_get_contents('https://api.mojang.com/users/profiles/minecraft/Notch');
echo getuuid('ImJingLan')."<br>";
$json = json_decode($str);

echo strtotime(date('Y-m-d h:m:s')) .' '. strtotime (date('Y-m-d h:m:s',strtotime("+1 second")));
?>